<template>
  <div class="organization">
    <AuthManageHeader />
    <div class="organization-content">
      <AuthManageTree :width="width" />
      <collapse-btn
        v-model:width="width"
        :baseWidth="baseWidth"
        from="organization"
        location="left"
      ></collapse-btn>
      <AuthManageArea />
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue';
import AuthManageHeader from '@/views/authManage/components/AuthManageHeader.vue';
import AuthManageTree from '@/views/authManage/components/AuthManageTree.vue';
import AuthManageArea from '@/views/authManage/components/authManageArea/Index.vue';
import CollapseBtn from '@/components/common/CollapseBtn.vue';

export default defineComponent({
  name: 'Organization',
  components: {
    AuthManageHeader,
    AuthManageTree,
    AuthManageArea,
    CollapseBtn,
  },
  setup() {
    const width = ref(200);

    return {
      width,
      baseWidth: 200,
    };
  },
});
</script>

<style lang="less" scoped>
.organization {
  background-color: @rb-background-color;
  height: 100vh;
  &-content {
    .flexRow(flex-start, flex-start);
    position: relative;
    height: calc(100% - 48px);
    .collapse-box {
      position: absolute;
      left: 200px;
      top: 50%;
      transform: translateY(-50%);
      width: 15px;
      font-size: 40px;
      transition: all 0.5s;
      .rb-icon {
        transform: translateX(-12.5px);
      }
    }
  }
}
</style>
